package com.example.zhaohang.dagger2.dagger;

import com.example.zhaohang.dagger2.MainActivity;
import com.example.zhaohang.dagger2.MainPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * 生成一个实例的容器
 * 固定写法
 * Created by 赵航 on 2017/7/15.
 */
@Module
public class MainModule {
    private MainActivity mMainActivity;

    public MainModule(MainActivity mMainActivity) {
        this.mMainActivity = mMainActivity;
    }

    @Provides
    MainPresenter provideMainPresenter() {
        return new MainPresenter(mMainActivity);
    }
}
